<div class="g-hd">
    <div class="m-head g-fluid">
        <div class="g-xs3"><span ng-hide="{{step==1}}" ng-click="back()"><i class="icon-font" title="返回">&#xe61f;</i>返回</span></div>
        <div class="g-xs6"><div class="tt">修改登录密码</div></div>
        <div class="g-xs3 f-tar" ng-bind-html="next"></div>
    </div>
</div>
<div class="g-ct">
    <form name="js_form" type="post"  class="m-form" novalidate ng-submit="forgetForm()">
        <div class="u-titlet f-tac">
            <span ng-class="{'z-sel':step==1}">输入手机号</span>><span ng-class="{'z-sel':step==2}">输入验证码</span>><span ng-class="{'z-sel':step==3}">设置新密码</span>
        </div>
        <div class="formitm f-cb" ng-show="step==1" >
            <div class="mn">
                <div class="mnc">
                    <input type="text" name="account" class="input" placeholder="请输入手机号码" ng-model="user.phone" required ng-pattern="/^1[3|5|8]\d{9}/" ng-change ="hasMobile()"/>
                    <div class="error" ng-show="js_form.account.$dirty && js_form.account.$invalid">
                        <small class="error" ng-show="js_form.account.$error.required">
                            手机号为必填项.
                        </small>
                        <small class="error" ng-show="js_form.account.$error.pattern">
                            手机号码不正确.
                        </small>

                    </div>
                </div>
            </div>
        </div>
        <div class="formitm f-cb" ng-show="step==2">
            <label class="lab">短信验证码：</label>
            <div class="mn" style="float:left;">
                <div class="mnc" style="margin:0 0 0 100px;">
                    <input type="text" name="sms" class="input" placeholder="短信验证码" ng-model="user.sms" required ng-minlength="6"  ng-maxlength="6"  ng-change="js_form.sms.$sendError = hasError = false"/>
                </div>
            </div>
            <div class="tip">
                <div class="error" ng-show="js_form.sms.$dirty && js_form.sms.$invalid">
                    <small class="error" ng-show="js_form.sms.$error.required">
                        验证码为必填项.
                    </small>
                    <small class="error" ng-show="js_form.sms.$error.maxlength">
                        验证码长度不能超过6个字符.
                    </small>
                </div>
                <div class="error" ng-show="js_form.sms.$sendError">
                    <small class="error" ng-show="js_form.sms.$sendError">
                        网络出错，请联系管理员.
                    </small>
                </div>
                <div class="error" ng-show="hasError" ng-bind-html="hasError"></div>
            </div>
        </div>
        <div ng-show="step==3">
            <div class="formitm f-cb">
                <label class="lab">密码：</label>
                <div class="mn">
                    <div class="mnc">
                        <input type="password" name="password" class="input" placeholder="密码" ng-model="user.password" required  ng-minlength="3" ng-maxlength="20"/>
                        <div class="error" ng-show="js_form.password.$dirty && js_form.password.$invalid">
                            <small class="error" ng-show="js_form.password.$error.required">
                                密码为必填项.
                            </small>
                            <small class="error" ng-show="js_form.password.$error.minlength">
                                密码长度至少为三个字符.
                            </small>
                            <small class="error" ng-show="js_form.password.$error.maxlength">
                                密码长度不能超过20个字符.
                            </small>
                        </div>
                    </div>
                </div>
            </div>
            <div class="formitm f-cb">
                <label class="lab">确认密码：</label>
                <div class="mn">
                    <div class="mnc">
                        <input type="password" name="repeatPassword" class="input" placeholder="确认密码" ng-model="user.repeatPassword" required ng-change="checkPassword()" ng-class="js_form.repeatPassword.$error.repeat ? '':'ng-valid'"/>
                        <div class="error" ng-show="js_form.repeatPassword.$dirty && js_form.repeatPassword.$invalid">
                            <small class="error" ng-show="js_form.repeatPassword.$error.required">
                                密码为必填项.
                            </small>
                            <small class="error" ng-show="js_form.repeatPassword.$error.repeat">
                                两次密码输入不一致.
                            </small>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="formitm">
            <div class="btn">
                <button ng-disabled="!js_form.account.$dirty || js_form.account.$invalid" ng-show="step==1" href="javascript:;" ng-click="getSms()"  class="button">获取验证码</button>
                <button ng-disabled="!js_form.sms.$dirty || js_form.sms.$invalid" ng-show="step==2" ng-click="step=3" href="javascript:;" class="button">下一步</button>
                <button ng-show="step==3" type="submit" ng-disabled="!js_form.password.$dirty && js_form.password.$invalid || !js_form.repeatPassword.$dirty || js_form.repeatPassword.$error.repeat"><span>保存修改</span></button>
            </div>
        </div>
    </form>
</div>
